const fs=require('fs')

//封装错误函数--直接导出
module.exports=(err)=>{
    //错误了就将日志中最后的ok改成404
    let log = fs.readFileSync('./logs/ordermeal.log', 'utf-8')
    log=log.replace(/ok$/,err)
    fs.writeFileSync('./logs/ordermeal.log',log)
}